package com.hmy.gateway.client;

import com.hmy.gateway.config.KeepUaaErrMsgConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;


@FeignClient(value = "hmy-ccp-uaa", configuration = KeepUaaErrMsgConfig.class)
public interface UaaClient {

    @PostMapping("/oauth/token")
    ResponseEntity<OAuth2AccessToken> postAccessToken(@RequestParam Map<String, String> params);

}
